package lab02.test11;

/**
 * Created by 阿阿阿阿豪丶 on 2017/10/25.
 */
public class Rectangle implements Printx {

    double length = 4;
    double width = 5;

    Rectangle(double length,double width){
        this.length = length;
        this.width = width;
    }

    public double area(double length,double width){
        double area = length * width;
        return area;
    }

    public double primeter(double length,double width){
        double primeter = length * width;
        return primeter;
    }




    @Override
    public void printMyWay() {
        System.out.println("边长为:" + length + "面积:" + area(length,width)+ "周长为:" + primeter(length,width));
    }
}
